package net.tv90.bfmccoreqqbot.util;

import org.bukkit.Bukkit;
import org.bukkit.command.CommandExecutor;

public class CommandRegistrar {

    public static void registerCommand(String command, CommandExecutor executor) {
        if (Bukkit.getPluginCommand(command) != null) {
            Bukkit.getPluginCommand(command).setExecutor(executor);
        } else {
            throw new RuntimeException(command + "命令已被注册过");
        }
    }

}
